MCS_FLAGS = -debug -unsafe -nowarn:0169,0618,0414

if LINUX
MCS_FLAGS += -define:ENABLE_INOTIFY -define:LINUX
endif

if WINDOWS
MCS_FLAGS += -define:WINDOWS
endif

ASSEMBLY_NAME = Dashboard.Util
ASSEMBLY = $(ASSEMBLY_NAME).dll

dashboarddir = $(pkglibdir)
dashboard_SCRIPTS = $(ASSEMBLY) $(ASSEMBLY).mdb

ASSEMBLY_REFERENCES = \
	-r:Mono.Posix \
	-r:System.Web \
	$(DBUSSHARP_LIBS) \
	$(GNOMESHARP_LIBS) \
	$(GTKSHARP_LIBS)

ASSEMBLY_SOURCES =  \
	AssemblyInfo.cs \
	Dashboard.Util/ArrayFu.cs \
	Dashboard.Util/ConfigureDefines.cs \
	Dashboard.Util/ExceptionHandlingThread.cs \
	Dashboard.Util/GnomeFu.cs \
	Dashboard.Util/HtmlRemovingReader.cs \
	Dashboard.Util/Inotify.cs \
	Dashboard.Util/PathFinder.cs \
	Dashboard.Util/ReflectionFu.cs \
	Dashboard.Util/SafeProcess.cs \
	Dashboard.Util/Stopwatch.cs \
	Dashboard.Util/StringFu.cs \
	Dashboard.Util/SystemInformation.cs \
	Dashboard.Util/ThreadAssist.cs \
	Dashboard.Util/ThreadPond.cs \
	Dashboard.Util/UnixClient.cs \
	Dashboard.Util/UnixListener.cs \
	Dashboard.Util/UriFu.cs \
	Dashboard.Util/WebpageFu.cs \
	Dashboard.Util/XmlFu.cs \
	Hal/AccessControl.cs \
	Hal/Context.cs \
	Hal/CPUFreq.cs \
	Hal/Device.cs \
	Hal/IAccessControl.cs \
	Hal/ICPUFreq.cs \
	Hal/IDevice.cs \
	Hal/IKillSwitch.cs \
	Hal/ILaptopPanel.cs \
	Hal/ILightSensor.cs \
	Hal/IManager.cs \
	Hal/IStorage.cs \
	Hal/ISystemPowerManagement.cs \
	Hal/IVolume.cs \
	Hal/IVolumeCrypto.cs \
	Hal/KillSwitch.cs \
	Hal/LaptopPanel.cs \
	Hal/LightSensor.cs \
	Hal/Manager.cs \
	Hal/PropertyModification.cs \
	Hal/Storage.cs \
	Hal/SystemPowerManagement.cs \
	Hal/Volume.cs \
	Hal/VolumeCrypto.cs \
	Lastfm/Lastfm.cs \
	NetworkManager/Device.cs \
	NetworkManager/IDevice.cs \
	NetworkManager/IManager.cs \
	NetworkManager/Manager.cs \
	PanelApplet/BonoboUIVerb.cs \
	PanelApplet/ChangeBackgroundHandler.cs \
	PanelApplet/ChangeSizeHandler.cs \
	PanelApplet/GnomeSharp.PanelAppletFactoryCallbackNative.cs \
	PanelApplet/MoveFocusOutOfAppletHandler.cs \
	PanelApplet/ObjectManager.cs \
	PanelApplet/PanelApplet.cs \
	PanelApplet/PanelAppletBackgroundType.cs \
	PanelApplet/PanelAppletFactory.cs \
	PanelApplet/PanelAppletFactoryCallback.cs \
	PanelApplet/PanelAppletFlags.cs \
	Twitter/Twitter.cs \
	Xesam/Xesam.cs

$(ASSEMBLY): $(ASSEMBLY_SOURCES)
	$(MCS) $(MCS_FLAGS) -target:library -out:$@ $(ASSEMBLY_REFERENCES) $(ASSEMBLY_SOURCES)

EXTRA_DIST = \
	$(ASSEMBLY_SOURCES) \
	AssemblyInfo.cs.in

CLEANFILES = $(ASSEMBLY) *.dll *.exe
DISTCLEANFILES = *.mdb Dashboard.Util/ConfigureDefines.cs
MAINTAINERCLEANFILES = Makefile.in 
